<div class="reg_cont_wrap">
	<form id="J_forum_pwd_form" action="{@url:bbs/forum/verify}" method="post">

	<div class="reg_message reg_ignore">
		<input type="hidden" name="fid" value="{$fid}" />
		<div class="mb10 f14">输入密码后继续访问</div>
		<div class="mb5"><input type="password" name="password" class="input length_3 mr5">
		<button type="submit" class="btn btn_submit" id="J_forum_pwd_btn">提交</button></div>
		<div class="tips_icon_error" id="J_forum_pwd_tip" style="display:none;">密码错误</div>

		<div class="error_return"><a href="javascript:window.history.go(-1);">返回上一页</a> 或者 <a href="{@url:bbs/index/run}">回到首页</a></div>
	</div>
	</form>
</div>
<script>
Wind.ready(function(){
	Wind.use('ajaxForm', function(){
		var forum_pwd_btn = $('#J_forum_pwd_tip'),
				forum_pwd_tip = $('#J_forum_pwd_tip');

		$('#J_forum_pwd_form').ajaxForm({
			dataType : 'json',
			beforeSubmit : function(){
				forum_pwd_tip.hide();
			},
			success : function(data){
				forum_pwd_tip.text(data.message);
				if (data.state == 'success') {
					forum_pwd_tip.attr('class', 'tips_icon_success').show();
					location.reload();
				}else if(data.state == 'fail'){
					forum_pwd_tip.attr('class', 'tips_icon_error').show();
				}
			}
		});
	});
});
</script>